package com.guigu.qingcheng.controller;

import com.guigu.qingcheng.pojo.order.TbOrderItem;
import com.guigu.qingcheng.service.GoodsServiceFeign;
import com.guigu.qingcheng.utils.R;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/sku")
@CrossOrigin
public class TbSkuController {

    @Autowired
    private GoodsServiceFeign goodsServiceFeign;

    @GetMapping("/price")
    public Integer price(@RequestParam("id") String id){
        return goodsServiceFeign.findPrice(id);
    }
    @GetMapping("/getItem")
    public String getItem(@RequestParam("skuId") String skuId){
        return goodsServiceFeign.getItem(skuId);
    }
}
